package com.woniuxy.service;

import com.woniuxy.model.entity.Goods;
import com.woniuxy.model.vo.AddGoodsVo;
import com.woniuxy.model.vo.GoodsVo;
import com.woniuxy.response.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "goods", path = "/goods")
public interface FeignGoodsService {
    /**
     * 无条件分页查询
     * @param goodsVo
     * @return
     */
    @PostMapping("/selectPage")
    public ResponseResult<Page<Goods>> selectPage(@RequestBody GoodsVo goodsVo);
    /**
     * 条件分页查询
     * @param goodsVo
     * @return
     */
    @PostMapping("/selectPageByCobdition")
    public ResponseResult<Page<Goods>> selectPageByCobdition(@RequestBody GoodsVo goodsVo);

    /**
     *根据addgoodsvo集合查询goods集合
     */
    @PostMapping("/findByListNumber")
    public ResponseResult<List<Goods>> findByListNumber(@RequestBody List<AddGoodsVo> addGoodsList);
}
